package day4;

import java.util.Random;

public class te8 {
    public static void main(String[] args) {
        int []arr = new int [10];
        Random r =new Random();
        int sum=0,count=0;
        double avg;
        //赋值
        for (int i = 0; i < arr.length; i++) {
            arr[i]=r.nextInt(100)+1;
        }
        //求和
        for (int i = 0; i < arr.length; i++) {
            sum+=arr[i];
        }
        avg =1.0*sum/10;//求平均
        for (int i = 0; i < arr.length; i++) {
            if(arr[i]<avg) count++;
        }
        System.out.println(sum+" "+avg+" "+count);
    }
}
